<!-- 首页 -->
<template>
    <view class="home-wrap u-m-b-20">

        <!-- #ifdef APP-PLUS -->
        <u-no-network @retry="init"></u-no-network>
        <!-- #endif -->
        <view class="content-box">
            <view>

                <view class="u-flex u-flex-col u-w-100s">
                    <view class="userInfo u-flex u-row-between u-col-center u-w-100s">
                        <view class="userleft u-flex u-row-left u-col-center u-w-100s u-p-l-20">
                            <view class="usertitle">任务详情</view>
                        </view>
                    </view>

                    <view class="collect-list u-w-100s">
                        <view class="zixun-item u-flex u-flex-col u-p-l-20 u-p-r-20">
                            <view class="u-flex u-row-between u-flex-col u-col-center u-w-100s">
                                <view class="u-flex u-row-between u-col-center u-w-100s task-item">
                                    <view class="kehulsit u-ellipsis-1">任务名称:</view>
                                    <view class="kehulsit u-ellipsis-1 u-m-l-10">{{ taskInfo.name }}</view>
                                </view>

                                <view class="u-flex  u-row-between u-col-center u-w-100s task-item">
                                    <view class="kehulsit u-ellipsis-1">体测项目:</view>
                                    <view class="kehulsit u-ellipsis-1 u-m-l-10">{{ taskInfo.project_name }}</view>
                                </view>
                                <view class="u-flex  u-row-between u-col-center u-w-100s task-item">
                                    <view class="kehulsit u-ellipsis-1">任务模式:</view>
                                    <view class="kehulsit u-flex u-m-l-10">
                                        {{ taskInfo.hasTest=='1'?'测试模式':'训练模式' }}
                                    </view>
                                </view>
                                <view class="u-flex  u-row-between u-col-center u-w-100s task-item">
                                    <view class="kehulsit u-ellipsis-1">考核标准:</view>
                                    <view class="kehulsit u-flex u-m-l-10">
                                        {{ taskInfo.standard_name }}
                                    </view>
                                </view>
                            </view>
                        </view>
                    </view>

                </view>
                <view class="u-flex u-flex-col u-w-100s">
                    <view class="userInfo u-flex u-row-between u-col-center u-w-100s">
                        <view class="userleft u-flex u-row-left u-col-center u-w-100s u-p-l-20">
                            <view class="usertitle">任务成绩</view>
                        </view>
                    </view>
                    <view class="collect-list u-w-100s">
                        <view class="zixun-item u-flex u-flex-col u-p-l-20 u-p-r-20" v-if="taskInfo.score">
                            <view class="u-flex u-row-between u-flex-col u-col-center u-w-100s">
                                <view class="u-flex u-row-between u-col-center u-w-100s task-item">
                                    <view class="kehulsit u-ellipsis-1">运动成绩:</view>
                                    <view class="kehulsit u-ellipsis-1 u-m-l-10">{{taskInfo.score}}</view>
                                </view>

                                <view class="u-flex  u-row-between u-col-center u-w-100s task-item">
                                    <view class="kehulsit u-ellipsis-1">运动耗时:</view>
                                    <view class="kehulsit u-ellipsis-1 u-m-l-10">{{taskInfo.duration}}</view>
                                </view>
                                <view class="u-flex  u-row-between u-col-center u-w-100s task-item">
                                    <view class="kehulsit u-ellipsis-1">运动评分:</view>
                                    <view class="kehulsit u-flex u-m-l-10">
                                        {{taskInfo.pingscore}}
                                    </view>
                                </view>
                                <view class="u-flex  u-row-between u-col-center u-w-100s task-item  task-items">
                                    <view class="kehulsit u-ellipsis-1">运动评定:</view>
                                    <view class="kehulsit u-flex u-m-l-10  task-item-color">
                                        {{taskInfo.rating=='0'?'不合格':(taskInfo.rating=='1'?'优秀':(taskInfo.rating=='2'?'良好':'及格'))}}
                                    </view>
                                </view>
                                <view class="u-flex  u-row-between u-col-center u-w-100s task-item">
                                    <view class="kehulsit u-ellipsis-1">班级排名:</view>
                                    <view class="kehulsit u-flex u-m-l-10">
                                        {{taskInfo.pnum}}/{{ taskInfo.cnum }}
                                    </view>
                                </view>
                                <view class="u-flex  u-row-between u-col-center u-w-100s task-item">
                                    <view class="kehulsit u-ellipsis-1">参与时间:</view>
                                    <view class="kehulsit u-flex u-m-l-10">
                                        {{ taskInfo.startTime }}
                                    </view>
                                </view>
                            </view>
                        </view>
	                    <view class="zixun-item u-flex u-flex-col u-row-center u-p-t-30 u-p-l-20 u-p-r-20">暂无成绩</view>
                    </view>
                </view>

            </view>
        </view>
        <!-- <shopro-tabbar></shopro-tabbar> -->
    </view>
</template>

<script>

let systemInfo = uni.getSystemInfoSync();
import { mapMutations, mapActions, mapState, mapGetters } from 'vuex';
export default {
    components: {

    },
    data() {
        return {
            task_id:'',
            taskInfo:{}
        };
    },
    computed: {

    },
    async onLoad() {
        this.taskInfo    = this.$Route.query.goods;
	    console.log("===JSON.parse(this.$Route.query.goods)",this.$Route.query.goods)
	    return
		this.task_id = this.taskInfo.id;
        this.getmychengji();
    },
    created(){
    },
    onPullDownRefresh() {
        // this.init();
    },
    oonPageScroll(e) {

    },
    onShow() {

    },
    onHide() {

    },
    mounted() {

    },

    watch: {

    },
    methods: {

        getmychengji(){
            let that = this;
            that.$http('login.task_info', {
                id: that.task_id
            }).then(res => {

                that.taskInfo = res.data;

            });
        },
    }
};
</script>

<style lang="scss">
.home-wrap{
}
.bianji{
    width: 90%;
    background: #0081ff;
    border-radius: 30rpx;
    color:#fff;
}
.input-item{
    color:#333;
    margin:20rpx 0rpx 20rpx 20rpx;
    height: 64rpx;
    background: #FFFFFF;
    border-radius: 30rpx;
    text-indent: 14rpx;
}
//nav
.zixun-item {
    border-radius: 20rpx;
    background: #fff;

    .zixuntitle {
        color: #333;
        font-size: 28rpx;
    }

    .zixunimg {
        width: 100%;
        height: 180rpx;

        image {
            width: 100%;
            height: 100%;
        }
    }

    .zixuntime {
        color: #cccccc;
        font-size: 24rpx;
    }

    .yichu {
        padding: 16rpx 26rpx;
        border-radius: 34rpx;
        background: #0081ff;
        color: #fff;
    }

    .tag {
        color: #fff;
        padding: 6rpx 18rpx;
        font-size: 20rpx;
        border-radius: 20rpx;
        border: 2rpx solid transparent;
        margin-right: 10rpx;
    }
}
.userInfo{
    .userleft{
        background: #F5F5F5;
        padding:20rpx 20rpx;
        .usertitle{
            font-size:30rpx;
        }
    }
    .userright{
        padding:10rpx 24rpx;
        background: #0081ff;
        border-radius: 30rpx;
        color: #FFFFFF;
    }

}
// 提示
.notice-modal {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    width: 85vw;
    min-height: 358rpx;
    background: #ffffff;
    padding: 30rpx;
    border-radius: 20rpx;

    .notice-title {
        width: 100%;
        font-size: 30rpx;
        font-weight: bold;
        color: #46351b;
        text-align: center;
    }

    .notice-detail {
        font-size: 24rpx;
        font-weight: 400;
        color: #999999;
        line-height: 36rpx;
        margin-bottom: 50rpx;
    }

    .back-btn {
        width: 45%;
        height: 70rpx;
        line-height: 70rpx;
        background: #f8f8f8;
        box-shadow: 0 7rpx 8rpx 2rpx #ccc;
        border-radius: 35rpx;
        font-size: 26rpx;
        font-weight: 500;
        color: #333;
        margin-bottom: 10rpx;
    }

    .notice-btn {
        width: 45%;
        height: 70rpx;
        line-height: 70rpx;
        font-size: 26rpx;
        font-weight: 500;
        color: #fff;
        border-radius: 35rpx;
        background: linear-gradient(90deg, #3357DB 0%, #3469E1 47%, #3597F1 100%);
        box-shadow: 0 7rpx 8rpx 2rpx #3597F1;
    }
}
.task-item{
    padding: 20rpx 0;
    border-bottom:2rpx solid #f5f5f5;
    .icon-phone{
        width: 80rpx;
        height: 80rpx;
    }
    .kehulsit{
        &:first-child{
            color:#8E8E8E;
        }
    }
}
</style>
